﻿using System;

using Rsdn.SmartApp;

namespace Rsdn.Janus
{
	internal class CommandProviderStrategy :
		RegElementsStrategy<CommandProviderInfo, CommandProviderAttribute>
	{
		public CommandProviderStrategy(IServicePublisher publisher)
			: base(publisher) { }

		public override CommandProviderInfo CreateElement(
			IExtensionAttachmentContext<Type, Attribute> context,
			CommandProviderAttribute attr)
		{
			return new CommandProviderInfo(context.ExtensionType);
		}
	}
}